/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
header {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: bold;
}

nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 内容区域 */
.content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 搜索区域 */
.search-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.search-section h2 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.4em;
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group label {
    min-width: 80px;
    font-weight: bold;
    color: #495057;
}

input, select {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
}

input:focus, select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 按钮 */
button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* 用户卡片 */
.user-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.user-header h3 {
    color: #495057;
    margin: 0;
    font-size: 1.3em;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.user-info {
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.user-info p {
    margin-bottom: 8px;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.user-info strong {
    min-width: 60px;
    color: #495057;
    margin-right: 8px;
}

.user-roles {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #f8f9fa;
}

.role-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.no-role {
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
}

/* 用户详情卡片 */
.user-detail-card {
    border: 2px solid #007bff;
    border-radius: 15px;
    padding: 30px;
    background: white;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.1);
}

.user-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.info-row label {
    font-weight: bold;
    min-width: 80px;
    color: #495057;
    margin-right: 10px;
}

.info-row span {
    color: #6c757d;
    flex: 1;
}

.roles-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.roles-section h4 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.2em;
}

.role-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #28a745;
}

.role-card h5 {
    margin-bottom: 5px;
    color: #495057;
}

/* 系统预定义角色样式 */
.sample-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.sample-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #495057;
    font-size: 1.8em;
}

.sample-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.sample-role-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.sample-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.sample-role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.sample-role-card:nth-child(1)::before {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.sample-role-card:nth-child(2)::before {
    background: linear-gradient(135deg, #48cae4, #0096c7);
}

.sample-role-card:nth-child(3)::before {
    background: linear-gradient(135deg, #51cf66, #40c057);
}

.role-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.sample-role-card h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.sample-role-card p {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.role-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.role-stats .stat {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

/* 提示信息 */
.info-tip {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group label {
        min-width: auto;
        margin-bottom: 5px;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .sample-roles {
        grid-template-columns: 1fr;
    }

    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-info {
        grid-template-columns: 1fr;
    }

    .user-detail-info {
        grid-template-columns: 1fr;
    }

    .role-stats {
        flex-direction: column;
        gap: 8px;
    }

    .info-row {
        flex-direction: column;
    }

    .info-row label {
        min-width: auto;
        margin-bottom: 5px;
    }
}